<?php
/**
 * Description: 设置页常见问题
 * User: devforma
 * Date: 15/4/27
 * Time: 15:20
 */

class GetQa implements iController {

    /**
     * api请求处理主函数
     * @param array $queryArgs 就是$_REQUEST变量
     * @return array api返回结果，必须含response_code
     */
    public function output($queryArgs) {
        global $cmsdb;

        $title = '《天天模考》常见问题';
        $content = $cmsdb->getVar('SELECT `post_content` FROM `wp_posts` WHERE `post_type`="post" AND `post_title`="'.$title.'"');

        $result = array('content' => '');
        if (!empty($content)) {
            $result['content'] = htmlspecialchars_decode($content);
        }

        return genOutput(1, $result);

    }
}